package io.coderyeah.basic;

import lombok.Data;

@Data
public class PageDTO {
    //默认当前页数为1
    private Integer currentPage = 1;
    //默认当前页数量为10
    private Integer pageSize = 5;

    private Integer beginIndex;

    //limit查询的起始索引
    public Integer getBeginIndex() {
        return (currentPage - 1) * pageSize;
    }
}
